/* 存放行政相关路由 */

import { DEFAULT_LAYOUT } from '../base';
// import DEFAULT_LAYOUT from '@/layout/default-layout.vue'
import { AppRouteRecordRaw } from '../types';
import administrationSubRoutes from './administration/index';
import homeSub from './homeSub';

const ADMINISTRATION: AppRouteRecordRaw = {
  path: '/administration',
  name: 'Administration',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '行政',
    requiresAuth: true,
    icon: 'icon-home',
    order: 7,
    hideInMenu: false,
    key: '8',
    roles: ['admin']
  },
  redirect: {
    name: 'EnterpriseAnnouncement'
  },
  children: [
    ...homeSub,
    {
      path: 'enterpriseAnnouncement',
      name: 'EnterpriseAnnouncement',
      component: () =>
        import(
          '@/views/Management/Administration/EnterpriseAnnouncement/index.vue'
        ),
      meta: {
        locale: '企业公告',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    ...administrationSubRoutes
  ]
};

export default ADMINISTRATION;
